1. Field of the Invention
The present invention relates to an image compression method and an image compression device suitable for use in image photography devices such as a digital camera, a video camera, etc.
2. Description of the Related Art
Conventionally, in image photography devices, such as a digital camera, a video camera, etc., when photographed images are recorded, an image quality setting is effected and data compression according to a quantization table value corresponding to that image quality setting is performed or the value of a quantization table is calculated which decides the file size corresponding to the image quality setting and data compression is performed.
As a determining method of quantization tables corresponding to the image quality setting, a technique which divides an original image into a plurality of blocks for measuring the amount of compressed data in each block and determining a quantization table for each divided block is disclosed in Japanese Laid-Open Patent Application (Kokai) (A) No. 8-204970 (1996), title“IMAGE DATA COMPRESSING AND EXPANDING DEVICE,” refer to page 6 and FIG. 5.
As disclosed in the above-mentioned reference, a selection method of the quantization tables is explained in which Discrete Cosine Transform (DCT) conversion of each divided block is accomplished and transform coefficients are generated. The generated transform coefficients are quantized in a quantization table selected from among a plurality of quantization tables. The quantized coefficients are then entropy encoded and compressed. In this compression case, the amount of data after compressing each block is measured and the results compared with a target amount of compressed data for every one block determined previously. If the amount of data after compression is more than the target amount of compressed data, a high compression ratio quantization table is selected and in the opposite case a low compression ratio quantization table is selected. Accordingly, compression is performed using a quantization table suitable to the properties of an image by block units.
However, in the conventional image compression method mentioned above, there are the following disadvantages.
Specifically, when a quantization table is changed according to the photographed object, even as the file size becomes larger the image quality remains essentially unchanged. However, since there is no concept for selecting a quantization table to create a smaller file size in spite of indistinguishable changes in the image quality, there is a problem in advancing effective utilization of the memory for image storage in this respect. Additionally, a typical image with many low frequency components in the transform coefficients after DCT conversion, for example, an image photographed of a blue sky without clouds, etc., the image quality remains basically unchanged even if the file size becomes larger.
Furthermore, since a quantization table is determined for each block, there is also a practical drawback in that compression processing which requires time to complete.